package com.xizi.yygh.config;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan("com.xizi.yygh.mapper") //mapperscan扫描xml文件
public class HospConfig {

    //MP分页插件实现物理分页
    @Bean //交给Spring容器管理
    public PaginationInterceptor PaginationInnerInterceptor(){
        return new PaginationInterceptor();
    }
}
